import request from '@/utils/request'
import type { infoResponseData, loginData, loginResponseData } from './model/login'

enum API {
    LOGINURL = '/admin/acl/index/login',
    INfO = '/admin/acl/index/info',
    LOGOUT = '/admin/acl/index/logout'
}

// 登录接口
export const reqLogin = (data:loginData) => request.post<any,loginResponseData>(API.LOGINURL, data)

// 获取用户信息接口
export const reqInfo = () =>request.get<any,infoResponseData>(API.INfO)

// 退出登录接口
export const reqLogout = () => request.post(API.LOGOUT)